<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>bootstrap</title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
</head>
<body>
<button id="btn" class="btn btn-lg btn-danger" data-toggle="popover" title="标题" data-content="说明内容">
    点我弹出/隐藏弹出框
</button>

<div id="alert" class="alert alert-info alert-dismissible">
    <button class="close" >
        <span id="times">&times;</span>
    </button>
    <strong>Info</strong>
</div>

<button id="myButton" data-loading-text="Loading..." class="btn btn-primary" autocomplete="off">
    按钮
</button>
<script src="js/jquery-3.6.0.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
$(function(){
    $("#btn").popover({
        placement:"bottom"
    });
    // $("#alert").on("closed.bs.alert",function(){
    //     alert(1);
    // })
    $("#times").click(function(){
        $("#alert").hide(2000)
    })
    $("#myButton").on("click",function(){
        var btn=$(this).button("loading");
        btn.button("toggle");
    })

    $("#myButton").click(function(){
        $(this).attr("disabled","disabled").text("Loading...");
    })

})
</script>

</body>
</html>